// src/main/java/org/nextcore/Main.java
package org.nextcore;

import org.nextcore.common.Results;
import org.teacher.entity.Emp;

import java.util.Arrays;
import java.util.List;

/**
 * Author：Fromsko
 * 主类，用于测试 Results 类，使用 Emp 类作为数据类型
 */
public class Main {
    public static void main(String[] args) {
        // 单个 Emp 对象数据
        Emp singleEmp = new Emp(1, "John", "john@example.com");
        Results<Emp> singleResult = Results.success(singleEmp);
        System.out.println("Single Emp data result: " + singleResult);

        // 多个 Emp 对象数据
        Emp emp1 = new Emp(2, "Jane", "jane@example.com");
        Emp emp2 = new Emp(3, "Bob", "bob@example.com");
        List<Emp> empList = Arrays.asList(emp1, emp2);
        Results<Emp> multipleResult = Results.success(empList);
        System.out.println("Multiple Emp data result: " + multipleResult);

        // 失败情况
        Results<Emp> failResult = Results.fail("Emp data retrieval failed");
        System.out.println("Fail result: " + failResult);
    }
}